﻿using SD.Infrastructure.RepositoryBase;
using SlamDunk.MES.Domain.Entities.ExecutionContext;
using SlamDunk.ValueObjects.Enums;
using System;
using System.Collections.Generic;

namespace SlamDunk.MES.Domain.IRepositories.Interfaces.ExecutionContext
{
    /// <summary>
    /// 工单仓储接口
    /// </summary>
    public interface IWorkOrderRepository : IAggRootRepository<WorkOrder>
    {
        #region # 分页获取工单列表 —— ICollection<WorkOrder> FindByPage(string keywords, Guid? productionPlanId...
        /// <summary>
        /// 分页获取工单列表
        /// </summary>
        /// <param name="keywords">关键字</param>
        /// <param name="productionPlanId">生产计划Id</param>
        /// <param name="executionPlanId">作业计划Id</param>
        /// <param name="processSegmentId">工艺段Id</param>
        /// <param name="workStationId">工位Id</param>
        /// <param name="needToInspect">是否需质检</param>
        /// <param name="hasInspected">是否已质检</param>
        /// <param name="dispatchedTeamId">分派班组Id</param>
        /// <param name="dispatchedPersonId">分派人员Id</param>
        /// <param name="startTime">开始时间</param>
        /// <param name="endTime">结束时间</param>
        /// <param name="statuses">工单状态集</param>
        /// <param name="facilityIds">工厂模型Id集</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">页容量</param>
        /// <param name="rowCount">总记录数</param>
        /// <param name="pageCount">总页数</param>
        /// <returns>工单列表</returns>
        ICollection<WorkOrder> FindByPage(string keywords, Guid? productionPlanId, Guid? executionPlanId, Guid? processSegmentId, Guid? workStationId, bool? needToInspect, bool? hasInspected, Guid? dispatchedTeamId, Guid? dispatchedPersonId, DateTime? startTime, DateTime? endTime, IList<WorkOrderStatus> statuses, IList<Guid> facilityIds, int pageIndex, int pageSize, out int rowCount, out int pageCount);
        #endregion
    }
}
